
module Mil
  module FS
    # This class represents a single File object stored
    # within the milfs storage system.
    class File
      attr_accessor :name, :node
      attr_accessor :namespaces, :tags
      attr_accessor :created, :updated, :accessed
      attr_accessor :contents

      def initialize(opts = {})
	if opts
	  opts.keys.each { |k|
	    if methods.include? "#{k.to_s}"
	      self.send "#{k.to_s}=".to_sym, opts[k]
	    end
	  }

	  @created = Time.now.to_f if @created.nil?
	end
      end

    end
  end
end
